package router

import (
	"github.com/gin-gonic/gin"
	"go-mall/global"
)

type ClientRouterGroup struct {
	UserRouter
	GoodsRouter
}

var GroupRouter = new(ClientRouterGroup)

func ClientRouter(router *gin.Engine, authMiddleware *gin.RouterGroup) {
	//prefix := "/api"
	publicRouter := router.Group(global.CONFIG.System.RouterPrefix)
	privateRouter := authMiddleware
	GroupRouter.UserRouter.ClientUserRouter(publicRouter, privateRouter)   // 用户相关模块
	GroupRouter.GoodsRouter.ClientGoodsRouter(publicRouter, privateRouter) // 商品相关模块
}
